<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <h3>{{cookie}}</h3>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.12/vue.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script>
      let vm = new Vue({
        el: "#app",
        data: {
          cookie: "",
        },
      });
      window.onload = function () {
        $.ajax({
          type: "get",
          url: "/index/",
          success: function (response) {
            if (response == 0) {
              window.location.href = "./registry.html";
              return;
            }
            vm.cookie = response;
          },
        });
      };
    </script>
  </body>
</html>
